import axios from './request'
const BASE = '/api'
const WEBSERVICE = '/webservice'

export const test = () => {
    return axios({
        url: `${BASE}/ceshi`,
        method: 'post',
    })
}

export const login = (data) => {
    return axios({
        url: `${BASE}/ceshi`,
        method: 'get',
        data: data
    })
}

// 计算接口-通过天数取数据
export const getdayPledgeRepo = (data) => {
    return axios({
        url: `${WEBSERVICE}/bondcal/pledgepepurchase/cal`,
        method: 'post',
        data: data
    })
}

export const getkeyghost = (data) => {
    const {
        key,
        zip,
        size,
        type,
    } = data || {};
    return axios({
        url: `${WEBSERVICE}/keyghost/service?key=${key}&zip=${zip}&size=${size}&type=${type}`,
        method: 'get',
    })
}


